<!DOCTYPE html>
<html>
  <head>
  	<div th:include="base-libs :: base-libs" />
    <title>已签约弹层</title>
	
    <meta name="keywords" content="keyword1,keyword2,keyword3">
    <meta name="description" content="this is my page">
    <meta name="content-type" content="text/html; charset=UTF-8">
    
	<script>
		$(function(){
			initView();
		})
		
		function initView(){
			initTable();
		}
		
		function initTable(){
		   $("#yqyTable").datagrid({
				idField : "USERID",
				fit:true,
				fitColumns: true,
				scrollbarSize:0, //预留的滚动条的宽度
				singleSelect:true,
				columns:[[
			   				{field:'XM', title:'姓名', width: 100, align: 'center'}
							,{field:'ZJHM', title:'证件号码', width: 120, align: 'center',formatter:function(value){
								var reg = /.{8}$/;
								return value.replace(reg,'********');
							}}
							,{field:'SJHM', title:'手机号码', width: 100, align: 'center'}
							,{field:'JTZZ', title:'家庭住址', width: 200, align: 'left',formatter:function(value){
								return '<span title="'+value+'">'+value+'</span>';
							}}
							,{field:'QYSJ', title:'签约时间', width: 90, align: 'center',formatter:function(value){
				                if(!StringUtils.isEmpty(value))
                                    return value.substring(0,10);
                            }}
							,{field:'RQFLMC', title:'人群分类', width: 100, align: 'center',formatter:function(value,row,index){
								if(!StringUtils.isEmpty(value))
									return '<span title="'+value+'">'+value+'</span>';
							}}
							,{field:'TDMC', title:'签约团队', width: 110, align: 'center',formatter:function(value){
								return '<span title="'+value+'">'+value+'</span>';
							}}
							,{field:'cz', title:'操作', width: 100, align: 'center',formatter:function(value,row,index){
								row = JSON.stringify(row).replace(/"/g, '&quot;'); 
								return '<span style="font-weight: bold;color: blue;cursor:pointer;" onclick="detailMsg('+ row +')">详细</span>';
							}}
				]],
				pagination : true,
				pageNumber : 1,
				pageSize : 10,
				pageList: [10, 25, 50, 100, 200],
				scrollBarSize:0,
				url:contextRoot + 'gzt/queryYqyjmDataByPage.service',
				onBeforeLoad : function(params) {
					$.extend(params,parent.gztQueryCondition);
				},
				onLoadSuccess: function(data){
	// 				alert(JSON.stringify(data))
				}
				
		  })
    }
	
	/** 查看详细  */
    function detailMsg(value) {
	   	StoreCache.setCache("BACKINFO", contextRoot + "gzt/yqyModel.html");
	   	StoreCache.setCache("JTQYXQINFO", value);
	   	StoreCache.setCache("fromQycx","1");
	   	location = "/service/jtqy/detail.html?to=detail&JMXXID=" + value.JMXXID;
    }
	</script>
  </head>
  
  <body class="easyui-layout">
    <div region="center" border="false">
    	<table id="yqyTable" border="false"></table>
    </div>
  </body>
</html>
